<?php

declare(strict_types=1);

namespace app\validate;

use think\Validate;

class Notice extends Validate
{
    protected $rule =   [
        'notice_title'   => 'require|max:50',
        'notice_content' => 'require', 
    ];

    protected $message  =   [
        'notice_title.require' => '标题不能为空',
        'notice_title.max' => '标题最多不能超过50个字符',
        'notice_content.require' => '内容不能为空', 
    ];

    protected $scene = [
        'add'  =>  ['notice_title', 'notice_content'],
    ];
}
